<template>

</template>

<script>
    import util from 'assets/js/util.js'

    export default {
        data() {
            return {}
        },
        mounted() {
            let token = util.getUrlParam(document.location.href, 'token');

            // var req = new XMLHttpRequest();
            // req.open('GET', document.location, false);
            // req.send(null);
            // var headers = req.getAllResponseHeaders().toLowerCase();
            // alert("1111111111111111111"+headers);
            // let token = '';
            sessionStorage.setItem('token', token);
            window.location.href = './index.html';
        },
        methods: {
            /* click: function () {
                 var fileInput = document.getElementById("fileInput");
                 if (fileInput == null) {
                     fileInput = document.createElement("input");
                     fileInput.id = "fileInput";
                     fileInput.type = "file";
                     fileInput.accept = "image/!*";
                     fileInput.style.height = "0px";
                     fileInput.style.display = "block";
                     fileInput.style.overflow = "hidden";
                     document.body.insertBefore(fileInput, document.body.firstChild);
                 }
                 let selectFile = function (event) {
                     console.log(event.target.files[0])
                 };
                 if (fileInput.addEventListener) {                    //所有主流浏览器，除了 IE 8 及更早 IE版本
                     fileInput.addEventListener("change", selectFile, false);
                 } else if (fileInput.attachEvent) {                  // IE 8 及更早 IE 版本
                     fileInput.attachEvent("onchange", selectFile);
                 }
                 setTimeout(function () {
                     fileInput.click()
                 }, 100);
             },*/
        }
    }
</script>

<style>

</style>
